<template>
    <div class = "twodimensioncode">
        <el-container v-loading = "loading">
        <el-container>
        <el-main>
        <div class = "box-wrapper">
            <div class = "title-wrapper">
                <p>{{basename}}</p>
            </div>
            <div class = "img-wrapper">
                <img :src="this.ewm + '/api/v1/qr/code/' + basename" alt="">
            </div>
        </div>
        </el-main>
        </el-container>
        </el-container>
    </div>
</template>
<script>
export default {
    data(){
        return{
            basename:'',
            loading:false
        }
    },
    created(){
        this.base()
    },
    methods:{
        base(){
            this.loading = true
            let base = JSON.parse(sessionStorage.getItem('user'))
            this.basename = base.baseName
            this.loading = false
        },
    }
}
</script>
<style scoped>
.twodimensioncode{
    width:100%;
}
.twodimensioncode .box-wrapper{
    width:500px;
    height:500px;
    margin: 100px auto;
}
.twodimensioncode .title-wrapper{
    text-align: center;
    font-weight: bold;
}
.twodimensioncode .img-wrapper{
    width:400px;
    height:400px;
    margin:0 auto;
}

</style>
